// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
//全局引入公用函数
import * as util from '@/assets/js/basic/util'
import App from './App'
import Vuex from 'vuex'

import axios from 'axios'
import axions_config from '../config/axions_config'


//引入公共样式
import '@/assets/css/reset.css'
import '@/assets/css/public.css'
import '@/assets/css/index.css'

import router from './router'

import store from '@/vuex/store'


Vue.use(Vuex)
Vue.config.productionTip = false
Vue.prototype.$http = axios
Vue.prototype.$util = util


router.beforeEach((to, from, next) => {
  if (to.meta.requireAuth) {  // 判断该路由是否需要登录权限
      next();
  }
  else {
      next();
  }
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {
    App,
  },
  template: '<App/>',
  created : function(){

  }

})

